package com.ruoyi.cbs.evaluate.service.impl;

import java.util.List;

import com.ruoyi.cbs.evaluate.domain.EvaluateDetail;
import com.ruoyi.cbs.evaluate.mapper.EvaluateDetailMapper;
import com.ruoyi.cbs.evaluate.service.IEvaluateDetailService;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 承包商考核明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-11
 */
@Service
public class EvaluateDetailServiceImpl implements IEvaluateDetailService
{
    @Autowired
    private EvaluateDetailMapper evaluateDetailMapper;

    /**
     * 查询承包商考核明细
     * 
     * @param id 承包商考核明细主键
     * @return 承包商考核明细
     */
    @Override
    public EvaluateDetail selectEvaluateDetailById(Long id)
    {
        return evaluateDetailMapper.selectEvaluateDetailById(id);
    }

    /**
     * 查询承包商考核明细列表
     * 
     * @param evaluateDetail 承包商考核明细
     * @return 承包商考核明细
     */
    @Override
    public List<EvaluateDetail> selectEvaluateDetailList(EvaluateDetail evaluateDetail)
    {
        return evaluateDetailMapper.selectEvaluateDetailList(evaluateDetail);
    }

    /**
     * 新增承包商考核明细
     * 
     * @param evaluateDetail 承包商考核明细
     * @return 结果
     */
    @Override
    public int insertEvaluateDetail(EvaluateDetail evaluateDetail)
    {
        evaluateDetail.setCreateTime(DateUtils.getNowDate());
        return evaluateDetailMapper.insertEvaluateDetail(evaluateDetail);
    }

    /**
     * 修改承包商考核明细
     * 
     * @param evaluateDetail 承包商考核明细
     * @return 结果
     */
    @Override
    public int updateEvaluateDetail(EvaluateDetail evaluateDetail)
    {
        evaluateDetail.setUpdateTime(DateUtils.getNowDate());
        return evaluateDetailMapper.updateEvaluateDetail(evaluateDetail);
    }

    /**
     * 批量删除承包商考核明细
     * 
     * @param ids 需要删除的承包商考核明细主键
     * @return 结果
     */
    @Override
    public int deleteEvaluateDetailByIds(Long[] ids)
    {
        return evaluateDetailMapper.deleteEvaluateDetailByIds(ids);
    }

    /**
     * 删除承包商考核明细信息
     * 
     * @param id 承包商考核明细主键
     * @return 结果
     */
    @Override
    public int deleteEvaluateDetailById(Long id)
    {
        return evaluateDetailMapper.deleteEvaluateDetailById(id);
    }
}
